# !/usr/bin/python
# -*-coding:utf-8 -*-
"""
@File    :   serializers.py
@Create  :   2021/9/15 19:51
@Author  :   David
"""
from rest_framework import serializers

from .models import Lybs


class LybsSerialzier(serializers.ModelSerializer):
    id = serializers.IntegerField(required=False)
    title = serializers.CharField(max_length=20)
    author = serializers.CharField(max_length=15)
    content = serializers.CharField(max_length=512)

    class Meta:
        model = Lybs
        fields = '__all__'
